<%@ include file="/WEB-INF/include/base.jsp" %>
<%@ page isELIgnored="false" %>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title><bean:message key="title.application"/></title>			
		<link rel="stylesheet" type="text/css" href="./common/master.css"/>
		<script language="javascript" src="./common/datepicker.js"></script>
	</head>
	<body>		
	<%@ include file="/WEB-INF/include/variables.jsp" %>	
	<table id="body" border="1">
		<tr><td id="header">This is header</td></tr>
		<tr>
			<td id="subheader">
				<%@ include file="/WEB-INF/include/mainlinks.jsp" %>
			</td>
		</tr>
		<tr>
			<td id="content">
				<c:if test="${errors!=null }">
					<c:set var="errors" value="${errors }" scope="request"/>
				</c:if>					
				<html:form action="/signup.do">
				<table id="signup">
					<tr><td colspan="31"><h4><bean:message key="heading.signup"/></h4></td></tr>
					<tr>
						<td><bean:message key="label.username"/></td>
						<td><html:text property="username"/></td>
						<td class="error">
							<html:messages id="errors" message="true" property="username">
								<c:out value="${errors }"/>
							</html:messages>
						</td>
					</tr>
					<tr>
						<td><bean:message key="label.password"/></td>
						<td><html:password property="password"/></td>
						<td class="error">
							<html:messages id="errors" message="true" property="password">
								<c:out value="${errors }"/>
							</html:messages>
						</td>
					</tr>
					<tr>
						<td><bean:message key="label.passwordConfirm"/></td>
						<td><html:password property="passwordConfirm"/></td>
						<td class="error">
							<html:messages id="errors" message="true" property="passwordConfirm">
								<c:out value="${errors }"/>
							</html:messages>
						</td>
					</tr>
					<tr>
						<td><bean:message key="label.emailAddress"/></td>
						<td><html:text property="emailAddress"/></td>
						<td class="error">
							<html:messages id="errors" message="true" property="emailAddress">
								<c:out value="${errors }"/>
							</html:messages>
						</td>
					</tr>
					<tr>				
						<td><bean:message key="label.firstName"/></td>
						<td><html:text property="firstName"/></td>
						<td class="error">
							<html:messages id="errors" message="true" property="firstName">
								<c:out value="${errors }"/>
							</html:messages>
						</td>
					</tr>
					<tr>					
						<td><bean:message key="label.lastName"/></td>
						<td><html:text property="lastName"/></td>
						<td class="error">
							<html:messages id="errors" message="true" property="lastName">
								<c:out value="${errors }"/>
							</html:messages>
						</td>
					</tr>
					<tr>
						<td><bean:message key="label.telNo"/></td>
						<td><html:text property="telNo"/></td>
						<td class="error">
							<html:messages id="errors" message="true" property="telNo">
								<c:out value="${errors }"/>
							</html:messages>
						</td>
					</tr>
					<tr>
						<td><bean:message key="label.mobileNo"/></td>
						<td><html:text property="telNo"/></td>
						<td class="error">
							<html:messages id="errors" message="true" property="mobileNo">
								<c:out value="${errors }"/>
							</html:messages>
						</td>
					</tr>
					<tr>
						<td><bean:message key="label.sex"/></td>
						<td>
							<html:select property="sex" value="-1">
								<html:option value="-1">Select</html:option>
								<html:option value="0">Male</html:option>
								<html:option value="1">Female</html:option>
							</html:select>							
						</td>
						<td class="error">
							<html:messages id="errors" message="true" property="sex">
								<c:out value="${errors }"/>
							</html:messages>
						</td>
					</tr>
					<tr>
						<td><bean:message key="label.birthdate"/></td>
						<td>
							<script language="javascript">
								newDatePicker("birthdate", 1990, 1930, false);
							</script>
							<html:hidden styleId="birthdate" property="birthdate"/>
						</td>
						<td class="error">
							<html:messages id="errors" message="true" property="birthdate">
								<c:out value="${errors }"/>
							</html:messages>
						</td>
					</tr>
					<tr>
						<td><bean:message key="label.streetAddress"/></td>
						<td><html:text property="streetAddress"/></td>
						<td class="error">
							<html:messages id="errors" message="true" property="streetAddress">
								<c:out value="${errors }"/>
							</html:messages>
						</td>
					</tr>
						<tr>
						<td><bean:message key="label.city"/></td>
						<td><html:text property="city"/></td>
						<td class="error">
							<html:messages id="errors" message="true" property="city">
								<c:out value="${errors }"/>
							</html:messages>
						</td>
					</tr>
						<tr>
						<td><bean:message key="label.state"/></td>
						<td><html:text property="state"/></td>
						<td class="error">
							<html:messages id="errors" message="true" property="state">
								<c:out value="${errors }"/>
							</html:messages>
						</td>
					</tr>
						<tr>
						<td><bean:message key="label.country"/></td>
						<td><html:text property="country"/></td>
						<td class="error">
							<html:messages id="errors" message="true" property="country">
								<c:out value="${errors }"/>
							</html:messages>
						</td>
					</tr>		
					<tr>					
						<td>&nbsp;</td>
						<td>
							<html:submit value="Cancel"/><html:submit value="Submit"/>
						</td>
						<td>&nbsp;</td>
					</tr>
				</table>				
				</html:form>				
			</td></tr>
		<tr><td id="footer">This is footer</td></tr>
	</table>
	</body>
</html>